refs #14599 - added OneShotTimer / moved some ShowTime logic out of Timer / added more --showtime tests#8435
Open
firewave wants to merge 2 commits intocppcheck-opensource:mainfrom
Open
refs #14599 - added OneShotTimer / moved some ShowTime logic out of Timer / added more --showtime tests#8435firewave wants to merge 2 commits intocppcheck-opensource:mainfrom
OneShotTimer / moved some ShowTime logic out of Timer / added more --showtime tests#8435firewave wants to merge 2 commits intocppcheck-opensource:mainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
9aaef72 to
f44ba03
Compare
489bff5 to
2986b72
Compare
OneShotTimer / moved some ShowTime logic out of TimerOneShotTimer / moved some ShowTime logic out of Timer added more --showtime tests
OneShotTimer / moved some ShowTime logic out of Timer added more --showtime testsOneShotTimer / moved some ShowTime logic out of Timer / added more --showtime tests
7517433 to
5a76a28
Compare
|
danmar
reviewed
Apr 24, 2026
| Timer realTimeClock("Overall time", settings.showtime, &overallTimerResults, Timer::Type::OVERALL); | ||
| std::unique_ptr<OneShotTimer> overallTimer; | ||
| if (settings.showtime == ShowTime::SUMMARY || settings.showtime == ShowTime::TOP5_SUMMARY) | ||
| overallTimer.reset(new OneShotTimer("Overall time", settings.showtime)); |
Collaborator
There was a problem hiding this comment.
This works. I am not against it. I am just thinking that the unique_ptr and new is unfortunate of course and maybe an alternative could be:
OneShotTimer overallTimer("Overall time", settings.showtime);
overallTimer.start(settings.showtime == ShowTime::SUMMARY || settings.showtime == ShowTime::TOP5_SUMMARY);
But what do you think?
Collaborator
Author
There was a problem hiding this comment.
I would prefer not to have additional functions which are callable to keep the interface simple. I might also rework this again a bit (not completely sure how yet) after the implementation and interface have been separated. But I am not there yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.